
public class ForLoopDemo1 {

	public static void main(String[] args) {
		// this shows that we print values of i from 1to10 using for loop.
		for(int i=1; i<11; i++){
		System.out.println("counter ="+ i);
		
		}
		
		//this shows that suppose we want 1 to 10 except 5, the code will execute all values of i except i=5.
		for(int i=1; i<11; i++){
			
			if(i==5){
				continue;
			}
			System.out.println("counter ="+ i);
		}
		
	
	//this shows that we want only values of i if i=5 and dont want anymore then the code will execute the 
		//values of i=1,2,3,4 only.
				
	for (int i=1; i<11; i++){
		
		if(i==5){
			
			break;
		}
		System.out.println("counter ="+ i);
	}
		
	}

}
